Add ingress status update and support for ingress class changes #67
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This release adds support for the modern Kubernetes IngressClass API and automatic ingress status updates, improving compliance with Kubernetes standards and user experience.
Features Implemented
1. IngressClass Resource Support
Added proper IngressClass resource definition and support for the modern
spec.ingressClassNamefield.What changed:
easyhaproxy(replaces verboseeasyhaproxy-ingress)spec.ingressClassName: easyhaproxyfield (Kubernetes 1.18+)kubernetes.io/ingress.class: easyhaproxy-ingressannotationingressclassesresourceBenefits:
Usage:
2. Automatic Ingress Status Updates
EasyHAProxy now automatically updates ingress status with load balancer addresses, populating the ADDRESS column in
kubectl get ingressoutput.What changed:
ingresses/statusupdatesBenefits:
Example output:
Configuration
Disable Status Updates
Override Deployment Mode Detection
Set External Hostname (ClusterIP mode)
Adjust Cache TTL
Backward Compatibility
No breaking changes. All existing deployments continue to work:
kubernetes.io/ingress.class: easyhaproxy-ingressstill supportedTechnical Details
Files Modified
Helm templates:
helm/easyhaproxy/templates/ingressclass.yaml(new)helm/easyhaproxy/templates/clusterrole.yaml(updated RBAC)helm/easyhaproxy/templates/deployment.yaml(added env vars)helm/easyhaproxy/values.yaml(added configuration)Python code:
src/processor/__init__.py(added detection and status update logic)src/functions/__init__.py(added configuration support)Static manifests (regenerated):
deploy/kubernetes/easyhaproxy-daemonset.ymldeploy/kubernetes/easyhaproxy-nodeport.ymldeploy/kubernetes/easyhaproxy-clusterip.ymlDocumentation:
docs/kubernetes.md(updated examples and explanations)deploy/kubernetes/README.md(enhanced with detailed instructions)RBAC Permissions Added
Migration Guide
For New Deployments
Use the modern approach:
For Existing Deployments
Option 1: Keep current annotation (still works)
Option 2: Migrate to new field (recommended)
Performance Impact
Future Enhancements
Potential improvements for consideration:
Related Documentation